import request from '@/utils/request'

// 对账单列表的接口
export function getPIs(params) {
  return request({
    url: `/online/flycare/admin/statement/list`,
    method: 'GET',
    params: params
  })
}

// 对账单详情的接口
export function getPIDetail(params) {
  return request({
    url: `/online/flycare/admin/statement`,
    method: 'GET',
    params: params
  })
}

// 生成对账单的接口
export function generateStatement(id) {
  return request({
    url: `/online/flycare/admin/statement/generate/${id}`,
    method: 'POST'
  })
}

// 根据合同生成对账单
export function generateStatementByContract(data) {
  return request({
    url: `/online/flycare/admin/statement/generate-by-contract/`,
    method: 'POST',
    data
  })
}
// 根据合同模块生成对账单
export function generateStatementByCustomer(data) {
  return request({
    url: `/online/flycare/admin/statement/generate`,
    method: 'POST',
    data
  })
}

